package com.itheima.sky.dao;

import com.itheima.sky.pojo.Employee;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface EmployeeMapper {



    @Select("select * from employee where username=#{username}")
    public Employee login(Employee employee);

    @Insert("insert into employee values(null,#{name},#{username},#{password},#{phone},#{sex},#{idNumber},#{status},#{createTime},#{updateTime},#{createUser},#{updateUser})")
    void save(Employee employee);

    List<Employee> findByName(String name);

    void update(Employee employee);

    @Select("select * from employee where id=#{id} ")
    Employee findById(Long id);


    @Select("select * from employee where username = #{username} and password = #{password}")
    Employee findUser(String username, String password);
}

